<template>
  <a-card :bordered="false">
    <a-tabs v-model="activeKey">
      <a-tab-pane
        key="0"
      >
        <span slot="tab">
			<a-icon type="login" />
      	 系统日志
        </span>
        <log modelType="systemLog" ref="systemLog" v-if="activeKey === '0'" />
      </a-tab-pane>
      <a-tab-pane
        key="1"
      >
      <span slot="tab">
			<a-icon type="calendar" />
      	 业务日志
        </span>
        <log modelType="businessLog" ref="businessLog" v-if="activeKey === '1'" />
      </a-tab-pane>
    </a-tabs>
  </a-card>
</template>

<script>
  import Log from './modules/Log'

  export default {
    name: 'F0501',
    components: { Log },
    data() {
      return {
        activeKey: '0',
      }
    },
    methods: {
      handleTabChange() {
        let key = this.activeKey;
        if (key === '0' && this.$refs.systemLog) {
          this.$refs.systemLog.loadData();
        } else if (key === '1' && this.$refs.businessLog) {
          this.$refs.businessLog.loadData();
        }
      },
    }
  }
</script>

<style lang="less" scoped>
@import '~@assets/less/search.less';
</style>